<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        //1. 把apple1给临时变量temp
        //2.把apple2给apple1
        //3.把临时变量里面的值给apple2
        var temp;
        var apple1 = '青苹果';
        var apple2 = '红苹果';
        temp = apple1; //把apple1给临时变量temp
        apple1 = apple2;//把apple2给apple1
        apple2 = temp;
        console.log(apple1);
        console.log(apple2);
    </script>
</head>
<body>

</body>
</html>